package com.csu.mapper;

import com.csu.entity.ExamGrade;
import com.csu.entity.Subject;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Repository
@Mapper
public interface ExamGradeMapper {
    //查询所有学生的成绩信息
    public List<ExamGrade> getExamGradeByExamIdAndSubjectId(int examId,int subjectId);

    //查询一个学生的成绩信息
    public List<ExamGrade> getExamGradeByExamIdAndUserId(int examId,int userId);

    //获取考试里面的所有学科信息
    public List<Integer> getSubjectByExamId(int examId);

    /**
     * 通过exam_id， user_id, subject_id获取examGrade对象
     */
    ExamGrade getExamGradeByExamIdAndUserIdAndSubjectId(int examId, int studentId, int subjectId);
}
